<!DOCTYPE html>
<html lang="en">
<head>
		<title>Snippets &mdash; Articles tagged notabug</title>
		<meta charset="utf-8" />
		<link rel="profile" href="http://gmpg.org/xfn/11" />
		<link rel="stylesheet" type="text/css" href="https://corteousquestions.club/theme/css/style.css" />
		<link rel='stylesheet' id='oswald-css'  href='http://fonts.googleapis.com/css?family=Oswald&#038;ver=3.3.2' type='text/css' media='all' />
		<style type="text/css">
			body.custom-background { background-color: #f5f5f5; }
		</style>
		<link rel="alternate" type="application/atom+xml"
			title="Snippets — Flux Atom"
			href="https://corteousquestions.club/" /> 
		<!--[if lte IE 8]><script src="https://corteousquestions.club/theme/js/html5shiv.js"></script><![endif]-->
</head>

<body class="home blog custom-background " >
	<div id="container">
		<div id="header">
				<h1 id="site-title"><a href="https://corteousquestions.club">Snippets</a></h1>
<h2 id="site-description">All that I will forget is here</h2>		</div><!-- /#banner -->
		
		<div id="menu">
			<div class="menu-navigation-container">
				<ul id="menu-navigation" class="menu">
						<li class="menu-item menu-item-type-post_type menu-item-object-page"><a href="https://corteousquestions.club/category/misc.html">misc</a></li>

				</ul>
			</div> <!--/#menu-navigation-container-->
		</div><!-- /#menu -->
		
		<div class="page-title">
<div class="page-title">
	<h2>Tagged with <span>notabug</span> &hellip;</h2>
</div>
		</div>
	
		<div id="contents">
<div class="post type-post status-publish format-standard hentry category-general" id="post">
	<div class="entry-meta">
		<div class="date"><a href="https://corteousquestions.club/manage-git-repo.html">Sat 17 April 2021</a></div>
		<span class="byline">By <a href="https://corteousquestions.club/author/mclds.html">mclds</a></span>
			<span class="cat-links"><a href="https://corteousquestions.club/category/misc.html" title="View all posts in misc" rel="category tag">misc</a></span>
	</div> <!-- /#entry-meta -->
	<div class="main">
		<h2 class="entry-title">
			<a href="https://corteousquestions.club/manage-git-repo.html" title="Permalink to Manage git repo" rel="bookmark">Manage git repo</a>
		</h2>
		<div class="entry-content">
			<p>1 - Create a new repository, if needed,<br>
   2 - Change the current working directory<br>
       to your local project.<br>
   3 - Initialize the local directory as a<br>
       Git repository:  </p>
<hr>
<p>git init -b main  </p>
<hr>
<p>4 - Adds the files in the local<br>
       repository and stages them for<br>
       commit. To unstage a file, use 'git<br>
       reset HEAD YOUR-FILE':  </p>
<hr>
<p>git add --all  </p>
<hr>
<p>5 - Commit the files that you've staged<br>
       in your local repository.  </p>
<hr>
<p>git commit -m "First commit"  </p>
<hr>
<p>6 - copy the remote repository URL.<br>
   7 - add the URL for the remote repository<br>
       where your local repository will be<br>
       pushed:  </p>
<hr>
<p>git remote add origin  <REMOTE_URL>  </p>
<hr>
<p>8 - Push the changes in your local<br>
       repository to remote repository:  </p>
<hr>
<p>git push origin main  </p>
<hr>
<p>https://bit.ly/3rBK9ce<br>
   To use in gitea, change origin to<br>
   origin_gitea and enter with pwd,<br>
   minegit.club.<br>
   If you're creating a new remote do the<br>
   following:  </p>
<hr>
<p>Create a README.md file. If using<br>
     notabug.<br>
   git remote add <origin_name> <URL>  </p>
<hr>
<p>For pushing the changes, if the remote is<br>
   new, you'll have to change the default<br>
   remote. You can change it back afterwards.  </p>
<hr>
<p>git push --set-upstream origin_name \<br>
   main  </p>
<hr>
<p>https://tinyurl.com/ydozlp34  </p>
		</div> <!--/#entry-content-->
    		<span class="tag-links"><strong>Tagged</strong>
 <a href="https://corteousquestions.club/tag/gitlab.html" rel="tag">gitlab</a>,  <a href="https://corteousquestions.club/tag/minegit.html" rel="tag">minegit</a>,  <a href="https://corteousquestions.club/tag/notabug.html" rel="tag">notabug</a>    		</span>
	</div> <!--/#main-->
</div>  <!--/#post-->		</div>
		
		<div id="footer">
			<p>Powered by <a href="http://getpelican.com">Pelican</a>, theme by <a href="http://bunnyman.info">tBunnyMan</a>.</p>
		</div><!-- /#footer -->
	</div><!-- /#container -->
	<div style="display:none"></div>
</body>
</html>